package database;

/**
 * class DbFile - symbolize a record of a file in DB
 */
public class DbFile {
	private Integer recordID;
	private Integer folderID;
	private Long fileID;
	private String fileName;
	
	/***
	 * default constructor
	 */
	public DbFile()	{}
	
	/***
	 * constructor - update folderID,fileID,fileName fields
	 * @param folderID - folder id that the file is under it
	 * @param fileID - id of the file content (hash)
	 * @param fileName - the file name
	 */
	public DbFile(Integer folderID, long fileID, String fileName)
	{
		this.folderID = folderID;
		this.fileID = new Long(fileID);
		this.fileName = fileName;
	}
	
	/***
	 * @return record id in the DB
	 */
	public Integer getRecordID() {
		return recordID;
	}
	
	/**
	 * @return folder id of the folder that the file is under it
	 */
	public Integer getFolderID() {
		return folderID;
	}
	
	/**
	 * @return file id - id of the file content (hash)
	 */
	public Long getFileID() {
		return fileID;
	}
	
	/**
	 * @return the file name
	 */
	public String getFileName() {
		return fileName;
	}
	
	/**
	 * update recordID field
	 * @param recordID - record id in the DB
	 */
	public void setRecordID(Integer recordID) {
		this.recordID = recordID;
	}
	
	/**
	 * update folderID field
	 * @param folderID - folder id of the folder that the file is under it
	 */
	public void setFolderID(Integer folderID) {
		this.folderID = folderID;
	}
	
	/**
	 * update fileID field
	 * @param fileID - id of the file content (hash)
	 */
	public void setFileID(Long fileID) {
		this.fileID = fileID;
	}
	
	/**
	 * update fileName field
	 * @param fileName - the file name
	 */
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	

}
